/* 全局样式重置与基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f9;
    padding: 20px;
    line-height: 1.6;
}

/* 页面标题样式 */
.page-title {
    color: #333;
    font-size: 28px;
    margin: 0 0 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #009688;
    display: inline-block;
}

/* 整体布局容器样式 */
.device-container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.device-container:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* 左侧图片容器样式 */
.device-image {
    width: 100%;
    padding: 25px;
    text-align: center;
    background-color: #f9f9f9;
}

.device-image img {
    width: 100%;
    max-width: 300px;
    height: 300px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.device-image img:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* 右侧信息容器样式 */
.device-info {
    width: 100%;
    padding: 25px;
}

.device-info h2 {
    color: #333;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.info-list {
    list-style-type: none;
}

.info-list li {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li:hover {
    background-color: #f9f9f9;
    padding-left: 20px;
}

/* 列表项标签样式 */
.label {
    font-weight: 600;
    color: #333;
    width: 100px;
    flex-shrink: 0;
}

/* 状态指示器样式 */
.status-section {
    display: flex;
    align-items: center;
    padding: 12px 15px;
}

.status-indicator {
    width: 200px;
    height: 24px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 0;
    background-size: 12px 12px;
    background-repeat: repeat;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-indicator:hover {
    border-color: #009688;
}

.connected {
    background-image: linear-gradient(90deg, rgba(0, 128, 0, 0.3) 25%, transparent 25%, transparent 50%, rgba(0, 128, 0, 0.3) 50%, rgba(0, 128, 0, 0.3) 75%, transparent 75%, transparent);
}

.disconnected {
    background-image: linear-gradient(90deg, rgba(255, 0, 0, 0.3) 25%, transparent 25%, transparent 50%, rgba(255, 0, 0, 0.3) 50%, rgba(255, 0, 0, 0.3) 75%, transparent 75%, transparent);
}

.tooltip {
    display: none;
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 10;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent;
}

.status-indicator:hover .tooltip {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, 5px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 响应式布局 */
@media (min-width: 768px) {
    .device-container {
        display: flex;
    }
    .device-image {
        width: 40%;
    }
    .device-info {
        width: 60%;
        border-left: 1px solid #eaeaea;
    }
}

@media (max-width: 767px) {
    body {
        padding: 15px;
    }
    .device-image, .device-info {
        padding: 15px;
    }
    .device-image img {
        height: 200px;
    }
    .info-list li, .status-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
